﻿<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" default-lazy="true" namespace="Cms.Domain" assembly="Cms.Domain">
  <class name="SourceCode" table="cmsSourceCode">
    <cache usage="read-write" />
    <id name="ID" type="System.Int32" unsaved-value="0">
      <column name="ID" />
      <generator class="identity" />
    </id>
    <bag cascade="all-delete-orphan" inverse="true" name="Versions" table="cmsSourceCodeVersion" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="SourceCodeID" />
      </key>
      <one-to-many class="SourceCodeVersion" />
    </bag>
    <many-to-one class="Site" name="Site">
      <column name="SiteID" not-null="false" />
    </many-to-one>
    <many-to-one class="SourceCodeVersion" name="CurrentVersion">
      <column name="CurrentVersionID" />
    </many-to-one>
  </class>
</hibernate-mapping>